<template>
	<view class="container">
		<BookResourcesChild :child="readList"></BookResourcesChild>
	</view>
</template>

<script>
	import Readlist from "@/model/readlist.js"
	import BookResourcesChild from "@/components/bookResourcesChild/bookResourcesChild.vue"
	export default {
		data() {
			return {
				readList: [],
			}
		},
		components: {
			BookResourcesChild
		},
		onLoad() {
			this.getReadlist();
		},
		methods: {
		    async getReadlist(){
				const res = await Readlist.getReadlistList();
				console.log(res)
				this.readList = res.books
			}
		}
	}
</script>

<style scoped>
.container{
	padding: 0 20rpx;
}
</style>
